//
//  BookViewController.swift
//  手账
//
//  Created by zhuxiaoxiang on 2018/12/15.
//  Copyright © 2018年 zhuxiaoxiang. All rights reserved.
//

import UIKit

class BookViewController: BaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
    }
    
}

extension BookViewController {
    @IBAction func btnClick(_ sender: UIButton) {
        let tag = sender.tag
        let bookListVC = BookListViewController()
        switch tag {
        case 1000:
            bookListVC.title = "支出账本"
            bookListVC.moneyType = "0"
        default:
            bookListVC.title = "收入账本"
            bookListVC.moneyType = "1"
            break
        }
        self.navigationController?.pushViewController(bookListVC, animated: true)
    }
}

extension BookViewController {
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        self.navigationController?.setNavigationBarHidden(true, animated: false)
    }
    
    override func viewWillDisappear(_ animated: Bool) {
        super.viewWillDisappear(animated)
        self.navigationController?.setNavigationBarHidden(false, animated: false)
    }
}
